package entradasalida;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.Enumeration;
import java.util.Properties;

import org.newdawn.slick.util.ResourceLoader;

public class CargadorImagenes {
	protected Properties imagenesProperty;
	
	
	public CargadorImagenes() {
		imagenesProperty = new Properties();

		InputStream in;
		try {
			in = ResourceLoader.class.getResourceAsStream("/res/imagenes.properties");
			imagenesProperty.load(in);
			in.close();
			imagenesProperty.list(System.out);
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		
	}
	
	public String obtenerRuta(String id){
		return this.imagenesProperty.getProperty(id);
	}
	
	public Enumeration<String> obtenerClaves() {
		return (Enumeration<String>) imagenesProperty.propertyNames();
	}
	
	
 

}
